import request from '@/utils/request'

// 编辑详情
export function getFindById(id) {
  return request.get('/storageSite/findById/' + id)
}

// 详情
export function getDetail(id) {
  return request.get('/storageSite/detail/' + id)
}

// 删除
export function deleteById(id) {
  return request.delete('/storageSite/del/' + id)
}

//新增 
export function add(form) {
  return request.post('/storageSite/save', form)
}

//修改
export function update(form) {
  return request.put('/storageSite/save', form)
}

//获取分页数据 
export function page(form, pageSize, currentPage) {
  return request.post('/storageSite/page', {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  })
}
// 编辑详情
export function findByStoreIdAndStorageId(storeId, storageId) {
  return request.get('/storageSite/findByStoreIdAndStorageId/' + storeId + '/' + storageId)
}

//出入库记录分页 
export function recordPage(form, pageSize, currentPage) {
  return request.post('/storageSite/record', {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  })
}